#pragma once
#include"StdAfx.h"
#include"TException.hpp"
#include"TEvent.hpp"
#include<boost/thread/thread.hpp>
class TTask {
public:
	int now;
	TEvent <TTask*> Do;
	TEvent <TTask*> OnPrograss;
	TEvent <TTask*> OnFinished;
	boost::thread* th;
	void Start();
	void MainDo();
	void Join();
	void Report(int _arg);
	void Release();
	TTask();
	TTask(IEventBase<TTask*>* _func);
};
